function addEvent(obj, evType, fn, useCapture){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be attached");
  }
}


// Wait until the page is loaded
// (Uses addEvent, described in the next chapter)
addEvent(window, "load", function() {
    // Perform HTML DOM operations
    //next(  id("everywhere") ).style.background = 'blue';
});
